<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="root"></div>

    <script src="./lib/react.js"></script>
    <script src="./lib/react_dom.js"></script>
    <script src="./lib/babel.js"></script>
    <script type="text/babel">
      // react18之前的语法
      /* const root = ReactDOM.render(
        <h1>hello</h1>,
        document.querySelector("#root")
      ); */

      // 1.创建一个根
      const root = ReactDOM.createRoot(document.querySelector("#root"));
      root.render(<h1>hello world</h1>);
    </script>
  </body>
</html>
